const mongoose = require('mongoose')
let Schema = mongoose.Schema
let resourcesSchema = new Schema({
  _id: {
    type:String,
    required:true
  },
  name: {
    type:String,
    required:true
  },
  description:{
    type:String,
    default:''
  },
  content:{
      type:String,
      required:true
  },
  create_time:{
    type:Date,
    default:Date.now()
  },
  update_time:{
    type:Date,
    default:Date.now()
  },
})
//创建Model对象
let resources = mongoose.model('resources', resourcesSchema)
module.exports = resources 